//传入express的server，将路径信息分配controller
const c = require('../controllers/user.server.controller');
console.log('in route');
function fn(app){
	app.route("/user")
	   .get(c.findAllUser)
	   .post(c.addUser);

	app.route("/user/:id")
	.get(c.loadUser)
	.put(c.updateUser)
	.delete(c.deleteUser);

	app.route("/temp")
		.get(c.goTemp)
}

module.exports = fn;